<template>
    <div class="all-singer-album clearfix">
      <div class="title">专辑{{$route.params.albumtotal}}</div>
      <SingerAlbum :picSize="picSize" :count="count" :list="list"></SingerAlbum>
    </div>
</template>

<script>
    import SingerAlbum from '@/components/SingerAlbum/SingerAlbum'
    import {mapState} from 'vuex'
    export default {
        name: "AllSingerAlbum",
        data(){
          return{
            picSize:300,
            count:parseInt(this.$route.params.albumtotal),
            list:[],
          }
        },
        computed:{
          ...mapState(['singerAlbum'])
        },
        components:{
          SingerAlbum
        },
        mounted(){
          this.$store.dispatch('getSingerAlbum',{singer_mid:this.$route.params.mid,begin:0,num:this.$route.params.albumtotal,order:'listen'})
       },
        watch:{
        singerAlbum(value){
          this.list=value.list
        }
      }
    }
</script>

<style scoped lang="less">
  .all-singer-album{
    width: 1200px;
    margin: 30px auto;
    .title{
      font-size:24px;
      line-height: 2;
    }
  }
</style>
